require("lualib_bundle");
__TS__SourceMapTraceBack(debug.getinfo(1).short_src, {["4"] = 1,["5"] = 1,["6"] = 3,["7"] = 3,["8"] = 3,["10"] = 30,["11"] = 31,["12"] = 32,["13"] = 33,["14"] = 34,["15"] = 35,["16"] = 35,["17"] = 35,["18"] = 35,["19"] = 35,["20"] = 35,["21"] = 35,["22"] = 36,["24"] = 38,["26"] = 41,["27"] = 42,["28"] = 43,["29"] = 45,["30"] = 46,["31"] = 46,["32"] = 46,["33"] = 46,["34"] = 46,["35"] = 46,["36"] = 46,["38"] = 48,["39"] = 49,["40"] = 50,["41"] = 50,["42"] = 50,["43"] = 50,["44"] = 50,["45"] = 50,["46"] = 50,["48"] = 31,["49"] = 54,["50"] = 55,["51"] = 56,["53"] = 58,["54"] = 59,["55"] = 59,["56"] = 59,["57"] = 59,["58"] = 59,["60"] = 29,["61"] = 16,["62"] = 16,["63"] = 16,["64"] = 16,["65"] = 16,["66"] = 16,["67"] = 16,["68"] = 16,["69"] = 16,["70"] = 16,["71"] = 16,["72"] = 3});
local ____exports = {}
local ____ForceUtil = require("solar.util.ForceUtil")
local ForceUtil = ____ForceUtil.default
____exports.default = __TS__Class()
local MapBaseInitState = ____exports.default
MapBaseInitState.name = "MapBaseInitState"
function MapBaseInitState.prototype.____constructor(self)
    local cfg = ____exports.default.config
    ForceUtil.forUserForce(function(____, player)
        if ____exports.default.config.goldForMapLvl > 0 then
            local mapLvl = DzAPI_Map_GetMapLevel(player)
            local mapLveAdd = mapLvl * mapLvl * ____exports.default.config.goldForMapLvl
            DisplayTimedTextToPlayer(
                player,
                0,
                0,
                10,
                ((("|cff00ffff你获得了" .. tostring(mapLveAdd)) .. "(地图等级^2*") .. tostring(____exports.default.config.goldForMapLvl)) .. ")的地图等级奖励金币！"
            )
            SetPlayerState(player, PLAYER_STATE_RESOURCE_GOLD, mapLveAdd + ____exports.default.config.gold)
        else
            SetPlayerState(player, PLAYER_STATE_RESOURCE_GOLD, ____exports.default.config.gold)
        end
        SetPlayerState(player, PLAYER_STATE_RESOURCE_LUMBER, ____exports.default.config.wood)
        SetPlayerState(player, PLAYER_STATE_RESOURCE_FOOD_CAP, ____exports.default.config.population)
        SetCameraFieldForPlayer(player, CAMERA_FIELD_TARGET_DISTANCE, ____exports.default.config.initial_lens_height, 0)
        if cfg.start_text and #cfg.start_text > 0 then
            DisplayTimedTextFromPlayer(
                player,
                0,
                0,
                10,
                ____exports.default.config.start_text
            )
        end
        if cfg.start_CreateUnitType and #cfg.start_CreateUnitType > 3 then
            local loc = GetPlayerStartLocationLoc(player)
            CreateUnit(
                player,
                FourCC(cfg.start_CreateUnitType),
                GetLocationX(loc),
                GetLocationY(loc),
                0
            )
        end
    end)
    if ____exports.default.config.player_see then
        FogEnableOff()
        FogMaskEnableOff()
    end
    for ____, playerindex in ipairs(____exports.default.config.open_gives_bounty) do
        SetPlayerState(
            Player(playerindex - 1),
            PLAYER_STATE_GIVES_BOUNTY,
            1
        )
    end
end
MapBaseInitState.config = {
    player_see = true,
    initial_lens_height = 2500,
    gold = 0,
    goldForMapLvl = 0,
    wood = 0,
    population = 100,
    start_text = "",
    start_CreateUnitType = "",
    open_gives_bounty = {}
}
____exports.default = MapBaseInitState
return ____exports
